#!/bin/sh
#
# Start the DHCP+DNS server daemon (dnsmask)
#

start() {
 	echo "Starting DHCP+DNS server... ***do NOT use on standard LAN***"
	start-stop-daemon --start -x /usr/sbin/dnsmasq -p /var/run/dnsmasq.pid
}	
stop() {
	echo -n "Stopping DHCP+DNS server..."
	start-stop-daemon --stop --name dnsmasq
}
reload() {
	echo -n "Reloading httpd..."
	killall -HUP dnsmasq
}
restart() {
	stop
	start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  reload)
	reload
	;;
  restart)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?

